package com.chapp.base;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Event implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	private String thumbnailURL;
	private String title;
	private List<String> artists;
	private Venue venue;
	private String description;
	private String ticketsInfo;
	private String date;
	private boolean cancelled = false;

	public Event(Event e) {
		this.id = e.id;
		this.title = e.title;
		this.artists = e.artists;
		this.venue = e.venue;
		this.thumbnailURL = e.thumbnailURL;
		this.description = e.description;
		this.ticketsInfo = e.ticketsInfo;
		this.date = e.date;
		this.cancelled = e.cancelled;
	}

	public Event() {
	}

	public Event copy() {
		return new Event(this);
	}

	public void addArtist(String artist) {
		if (artists == null) {
			artists = new ArrayList<String>();
		}
		artists.add(artist);
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public List<String> getArtists() {
		return artists;
	}

	public void setArtists(List<String> artists) {
		this.artists = artists;
	}

	public Venue getVenue() {
		return venue;
	}

	public void setVenue(Venue venue) {
		this.venue = venue;
	}

	public String getThumbnailURL() {
		return thumbnailURL;
	}

	public void setThumbnailURL(String thumbnailURL) {
		this.thumbnailURL = thumbnailURL;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getTicketsInfo() {
		return ticketsInfo;
	}

	public void setTicketsInfo(String ticketsInfo) {
		this.ticketsInfo = ticketsInfo;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public boolean isCancelled() {
		return cancelled;
	}

	public void clean() {
		this.id = null;
		this.title = null;
		this.artists = null;
		this.venue = null;
		this.thumbnailURL = null;
		this.description = null;
		this.ticketsInfo = null;
		this.date = null;
		this.cancelled = false;
	}

	public void setCancelled(boolean b) {
		this.cancelled = b;		
	}
}
